package com.tul.exercise.base.swing.base;

import javax.swing.*;
import java.util.concurrent.TimeUnit;

/**
 * @Description 《java编程思想》第22章 示例2：
 *
 * 显示标签
 **/
public class HelloLable {

    public static void main(String[] args) throws Exception{
        JFrame frame = new JFrame("Hello Swring");
        JLabel label = new JLabel("A Label");

        frame.add(label);

        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(300, 100);
        TimeUnit.SECONDS.sleep(1);
        frame.setVisible(true);

        label.setText("Hey this is different");
    }
}
